<style>
.layui-form-pane .layui-form-label{width:auto;}
.layui-form-item{margin-bottom: 0px;}
.order-time-bg{background-color:#1E9FFF;color:white;padding:0px 5px;}
</style>
<div class="fixed-bar">
<form class="layui-form layui-form-pane fixed-bar-form" action="{:url()}" method="get" id="hisi-table-search">
<div class="layui-form-item">	
	<div class="layui-inline">
		<label class="layui-form-label">员工</label>
		<div class="layui-input-inline">
			{:Form::select('admin_id', '', $checkclothShrinkUserKV, '', '')}
		</div>
	</div>
	<div class="layui-inline">
		<label class="layui-form-label">工序</label>
		<div class="layui-input-inline">
			{:Form::select('type', '', $typeArr, '', '')}
		</div>
	</div>
	<div class="layui-inline">
		<label class="layui-form-label">日期</label>
		<div class="layui-input-inline">
			<input type="text" name="create_date_range" readonly="" id="create_date_range" lay-verify="" placeholder="选择日期" class="layui-input">
		</div>
	</div>
	<div class="layui-inline">
		<button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">搜索</button>
	</div>
</div>
</form>
</div>

<table id="dataTable"></table>

{include file="system@block/layui" /}
<script type="text/html" title="模板" id="btnTpl">
	<a href="{:url('kpiDetail')}?uid={{ d.uid }}&type={{ d.type }}&date={{ d.date }}" class="layui-btn layui-btn-sm layui-btn-primary hisi-iframe" hisi-data="{width: '800px', height: '600px'}" title="考核详情">详情</a>
</script>

<script type="text/javascript">
    layui.use(['table', 'tool', 'jquery', 'laydate'], function() {
        var $ = layui.jquery;
    	var table = layui.table;
    	var laydate = layui.laydate;
        
    	laydate.render({
		    elem: '#create_date_range'
		    ,range: '~'
		    ,theme: 'molv'
		    ,mark: {'{:$today}':''}
	    	,change: function(value, date, endDate){
		    	$('#create_date_range').val(value);
            	$('#layui-laydate1').remove();//关闭面板
            }
		});
    	
        table.render({
            elem: '#dataTable'
            ,url: '{:url()}' //数据接口
            ,page: false //开启分页
            ,skin: 'row'
            ,even: true
            ,limit: 20
            ,limits: [20,50,100,150,200]
            ,text: {
                none : '暂无相关数据'
            }
            ,cellMinWidth: 80
            ,toolbar: '#toolbar'
            ,defaultToolbar: ['filter', 'exports', 'print']
            ,cols: [[ //表头
            	{field: 'userName', title:'姓名'}
           		,{field: 'userRole', title:'职能'}
           		,{field: 'typeName', title:'工序'}
           		,{field: 'date', title:'完成日期',width:120}
           		,{field: 'taskTotal', title:'任务总数（条）'}
           		,{field: 'overTotal', title:'完成总数（条）'}
           		,{field: 'unOverTotal', title:'未完成总数（条）'}
           		,{field: 'overRate', title:'完成率'}
           		,{field: 'widthTotal', title:'幅宽总数'}
           		,{field: 'widthDiffTotal', title:'幅宽差异统计'}
           		,{field: 'widthRate', title:'准确率（幅宽）'}
           		,{field: 'lengthTotal', title:'米长总数'}
           		,{field: 'lengthDiffTotal', title:'米长差异统计'}
           		,{field: 'lengthRate', title:'准确率（米长）'}
           		,{field: 'standardRate', title:'综合达标率（平均）'}
           		,{field: '', title:'操作', templet:'#btnTpl'}
            ]]
            ,done: function(res){
            }
        });
        
    });
</script>